
from selenium.webdriver.common.by import By

#对象库
from XuechebuLogin.base.basePage import BasePage, BaseHandle


class PageHome(BasePage):
    def __init__(self):
        super().__init__()
        self.my_text=By.ID, "com.bjcsxq.chat.carfriend:id/mine_layout"
        self.login_text=By.ID, "com.bjcsxq.chat.carfriend:id/mine_username_tv"

    def find_my_text(self):
        return self.get_element(self.my_text)
    def find_login_text(self):
        return self.get_element(self.login_text)

#操作库
class HandleHome(BaseHandle):
    def __init__(self):
        self.page_home=PageHome()

    def click_my_btn(self):

        self.page_home.find_my_text().click()

    def click_login_btn(self):
        self.page_home.find_login_text().click()


# 业务层
class ProxyHome:
    def __init__(self):
        self.handleHome=HandleHome()

    def go_login(self):
        self.handleHome.click_my_btn()
        self.handleHome.click_login_btn()






